package com.cta.view.json.tree;

import java.util.ArrayList;

public class TariffEntityTreeNode extends BasicTreeNode<TariffEntityTreeNode> {

	private Long parentId;
	private String type = "Site";

	public TariffEntityTreeNode(Long parentId, Long obId, String text) {
		this.parentId = parentId;
		setObId(obId);
		setText(text);
		setExpanded(true);
		setIconCls("icon-root-organization");
		setChildren(new ArrayList<TariffEntityTreeNode>());
	}
	
	public TariffEntityTreeNode(Long parentId, Long obId, String text, String type) {
		this(parentId, obId, text);
		this.type = type;
		if("pbx".equals(type)){
			setIconCls("icon-pbx-tree");
		} else {
			setIconCls("icon-pbx");
		}
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
